//
//  CarTableViewCell.m
//  HomeWork-19
//
//  Created by 鹏飞罗 on 16/8/9.
//  Copyright © 2016年 罗鹏飞. All rights reserved.
//

#import "CarTableViewCell.h"
#import "Car.h"
@implementation CarTableViewCell
//- (instancetype)initWithCoder:(NSCoder *)aDecoder {
//    self = [super initWithCoder:aDecoder];
//    if (self) {
//        
//    }
//    return self;
//}

//- (void)setCarImageView:(UIImageView *)carImageView {
//   
//}
//- (void)setCarLabel:(UILabel *)carLabel {
// 
//}

- (void)setCar:(Car *)car {

    _car = car;
     self.carLabel.text = _car.name;
     NSURL *carURL = [NSURL URLWithString:_car.imgurl];
    self.carImageView.image = [UIImage imageWithData:[NSData dataWithContentsOfURL:carURL]];
}
//- (void)layoutSubviews {
//    [super layoutSubviews];
//}
- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
